<template id='song'>
  <li class="search_res" @click="add_play_music(song_data.name,song_data.id,song_data.index,song_data.ar)">
    <div class="li_left">
      <p class="li_left_t">{{ song_data.name }}</p>
      <p class="li_left_b">{{ song_data.ar }} - {{ song_data.al }}</p>
    </div>
    <div class="li_right">
      <i class="iconfont icon-bofang"></i>
    </div>
  </li>
</template>
<script>
// export { song };
export default {
  name: "song",
  props: {
    song_data: {
      type: Object
    }
  },
  methods:{
    add_play_music(name,song_data,index,ar){
      this.$emit("play",name,song_data,index,ar)
      // console.log(name,song_data,index,ar)
    }
  }
};
</script>
<style lang="scss">
.search_res {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 15px;
  height: 3rem;
  border-bottom: 1px solid #ebecec;
  .li_left {
    text-align: left;
    width: 90%;
    white-space: nowrap;
    .li_left_t {
      color: #507daf;
      font-size: 16px;
      text-overflow: ellipsis;
      overflow: hidden;
    }
    .li_left_b {
      color: #888888;
      font-size: 12px;
    }
  }
  .li_right {
    font-size: 14px;
    width: 5%;
  }
}
</style>